package cn.ghx.tool.novel.grabber;

/**
 * 解析器工程类
 */
public class GrabberFactory {

    /**
     * 直接通过工程类创建解析器
     * @param url   要解析的地址
     * @return
     * @throws Exception
     */
    public static Grabber create(String url,String path) throws Exception {
        if(url.contains("xinguli.com")){
            return new GrabberXinguli(url,path);
        }else if(url.contains("biquku.com")){
            return new GrabberBiqu(url,path);
        }
        throw new Exception("暂不支持解析："+url);
    }
}
